#ifndef GLWINDOW_H_
#define GLWINDOW_H_

#include "Shader.h"
#include "TextureRGB.h"

class Mesh
{
protected:
	GLuint					VertexArrayID;
	GLuint					VertexBufferID;
	GLuint					UVBufferID;
	GLuint					NormalBufferID;

	std::vector<GLfloat>	vertex_buffer_data;
	std::vector<GLfloat>	uv_buffer_data;
	std::vector<GLfloat>	normal_buffer_data;
public:
};

class GLWindow
{
	float angle;

	GLuint vertexbuffer;
	GLuint uvbuffer;
	GLuint normalbuffer;

	// Texture
	TextureRGB texture;

	// Geometry
	GLuint VertexArrayID;
	
	std::vector<GLfloat> g_vertex_buffer_data;
	std::vector<GLfloat> g_uv_buffer_data;
	std::vector<GLfloat> g_normal_buffer_data;

	Shader PhongShadingShader;

public:
	GLWindow();
	~GLWindow();

	virtual bool	init();
	virtual void	destroy();

	virtual void	initGLSetting();
	virtual void	destroyGLSetting();
	virtual void	initGLFW();
	virtual void	initGLEW();
	virtual void	destroyGLFW();
	virtual void	destroyGLEW();

	virtual void	frameMove();
	virtual void	frameRender();

	virtual void	mainLoop();
};

#endif // GLWINDOW_H_